<%-- 
    Document   : viewStatic
    Created on : Aug 29, 2012, 8:59:53 PM
    Author     : phong
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <f:view>
            <a href="signList.jsp">Sign List</a>&nbsp;|&nbsp;
            <a href="viewStatic.jsp">View Static</a>&nbsp;|&nbsp;
            <a href="reportList.jsp">Report Static</a>
            <h1>View Static</h1>  
            <h:form id="labList">  
                Use Date: <h:inputText  value="#{staticBean.startDate}"/>
                <h:inputText  value="#{staticBean.endDate}"/>
                <h:selectOneMenu value="#{staticBean.status}">
                    <f:selectItem  itemLabel="All" itemValue="All"></f:selectItem>
                    <f:selectItem  itemLabel="Used" itemValue="Used"></f:selectItem>
                </h:selectOneMenu>      
                <h:selectOneMenu value="#{staticBean.timeTableId}">
                    <f:selectItem  itemLabel="All" itemValue="All"></f:selectItem>
                    <f:selectItem  itemLabel="T1: 7:30 - 9:30" itemValue="T1"></f:selectItem>
                    <f:selectItem  itemLabel="T2: 9:30 - 11:30" itemValue="T2"></f:selectItem>
                    <f:selectItem  itemLabel="T3: 13:30 - 15:30" itemValue="T3"></f:selectItem>
                    <f:selectItem  itemLabel="T4: 15:30 - 17:30" itemValue="T4"></f:selectItem>
                </h:selectOneMenu>
                <h:commandButton value="Search" action="search"/>         
                <h:dataTable var="statics" value="#{staticBean.viewStatic()}" border="1" >
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Lab ID"/>
                        </f:facet>
                        <h:commandLink value="#{statics.lab.id}" action="labInfo" 
                                       actionListener="#{labBean.getLabByID(statics.lab.id)}"/>
                    </h:column>  
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Times"/>
                        </f:facet>
                        <h:outputText value="#{statics.count}"/>
                    </h:column>                    
                </h:dataTable>
            </h:form>
        </f:view>
    </body>
</html>
